/*
 * permutation.cpp
 *
 *create the pemutation vector from the new vector level_node_set
 * -->  permutation [i]=j  means: i old number, j new numer
 * --> level_node_set[permutation [i]] = i
 *  Created on: 6 Dec 2013
 *      Author: to
 */



#include <iostream>

void create_permutation(int * level_node_set,int * permutation, int iSizeofMatrix)

{

int i,j;

for (i=0; i< iSizeofMatrix; i++)
{

	for (j=0; j< iSizeofMatrix;j++)
	{

		if (i==level_node_set[j])
		{
			permutation[i] = j;
			break;
		}

	}

}

}



